#include<stdio.h>
#include<math.h>

int main() 
{
int terms, n;
double y=0,x;
printf("Enter number of terms");
scanf("%d",&terms);
printf("enter the value of x");
scanf("%lf",&x);
if(x<0||x>2)
{
printf("error message.\n");
}
else
{
	for(n=1;n<=8;n=n+1)
		y=y+pow((x-1),n)*pow(-1,(n-1))/n;
	printf("The aproximation value of ln(%lf)  up to %d terms is %lf .\n ",x,terms,y);
	printf("the value of ln(%lf) using the stander log function is %lf ",x,y);
 } 
return 0;
	
	
}
